home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Development Libraries / SGI IRIX 6.2 Development Libraries.iso / dist / complib.idb / usr / share / catman / p_man / cat3 / complib / fft1d.z / fft1d
Text File  |  1996-03-14  |  6KB  |  133 lines

  1.  
  2.  
  3.  
  4. ccccfffffffftttt1111dddd,,,,zzzzfffffffftttt1111dddd((((3333FFFF))))                                            ccccfffffffftttt1111dddd,,,,zzzzfffffffftttt1111dddd((((3333FFFF))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ccccfffffffftttt1111dddd,,,, zzzzfffffffftttt1111dddd ---- 1D, Real Complex-to-Complex, Fast Fourier Transforms.
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
  12.      _F_o_r_t_r_a_n :
  13.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ccccfffffffftttt1111dddd(((( ssssiiiiggggnnnn,,,, nnnn,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc,,,, ccccooooeeeeffffffff ))))
  14.           iiiinnnntttteeeeggggeeeerrrr ssssiiiiggggnnnn,,,, nnnn,,,, iiiinnnncccc
  15.           ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((0000::::((((NNNN----1111))))****iiiinnnncccc)))),,,, ccccooooeeeeffffffff((((nnnn++++11115555))))
  16.      ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee zzzzfffffffftttt1111dddd(((( ssssiiiiggggnnnn,,,, nnnn,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnncccc,,,, ccccooooeeeeffffffff ))))
  17.           iiiinnnntttteeeeggggeeeerrrr ssssiiiiggggnnnn,,,, nnnn,,,, iiiinnnncccc
  18.           ddddoooouuuubbbblllleeee ccccoooommmmpppplllleeeexxxx aaaarrrrrrrraaaayyyy((((0000::::((((NNNN----1111))))****iiiinnnncccc)))),,,, ccccooooeeeeffffffff((((nnnn++++11115555))))
  19.  
  20.      _C :
  21.      ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
  22.      iiiinnnntttt ccccfffffffftttt1111dddd (((( iiiinnnntttt ssssiiiiggggnnnn,,,, iiiinnnntttt nnnn,,,, ccccoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,
  23.                iiiinnnntttt iiiinnnncccc,,,, ccccoooommmmpppplllleeeexxxx ****ccccooooeeeeffffffff))));;;;
  24.      iiiinnnntttt zzzzfffffffftttt1111dddd (((( iiiinnnntttt ssssiiiiggggnnnn,,,, iiiinnnntttt nnnn,,,, zzzzoooommmmpppplllleeeexxxx ****aaaarrrrrrrraaaayyyy,,,,
  25.                iiiinnnntttt iiiinnnncccc,,,, zzzzoooommmmpppplllleeeexxxx ****ccccooooeeeeffffffff))));;;;
  26.  
  27.  
  28. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  29.      ccccfffffffftttt1111dddd and zzzzfffffffftttt1111dddd compute the Fourier transform of a complex sequence.
  30.      The k-th index F(k) of the Fourier transform of a real sequence f(i) is
  31.      equal to:
  32.           F(k) = Sum ( W^(i*k) * f(i) ), for i =0, ..., (N-1)
  33.                W = exp( (Sign*2*sqrt(-1)*PI) / N )
  34.  
  35.  
  36.      The Direct Fourier transform is performed in-place, so the input sequence
  37.      is overwritten by its Fourier transform.
  38.  
  39. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  40.      SSSSIIIIGGGGNNNN Integer specifying which sign to be used for the expression of W
  41.      (see above) - must be either +1 or -1.
  42.      The choice for the sign of the direct transform is just a matter of
  43.      convention. For the reverse transform, it must be the opposite.
  44.      Unchanged on exit.
  45.  
  46.      NNNN Integer, the number of samples in each sequence.
  47.      Unchanged on exit.
  48.  
  49.      AAAARRRRRRRRAAAAYYYY Array containing the samples of the sequence to be transformed.
  50.      On input, the element "i" of the sequence is stored as A(i*inc) in
  51.      _F_o_r_t_r_a_n , and A[i*inc] in _C.
  52.      On exit, the array is overwritten by its transform.
  53.  
  54.      IIIINNNNCCCC Integer, increment between two consecutive elements of a sequence.
  55.      Unchanged on exit.
  56.  
  57.      CCCCOOOOEEEEFFFFFFFF Array of at least ( N + 15 ) elements.  On entry it contains the
  58.      Sines/Cosines and factorization of N. COEFF needs to be initialized with
  59.      a call to cfft1di or zfft1di.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccfffffffftttt1111dddd,,,,zzzzfffffffftttt1111dddd((((3333FFFF))))                                            ccccfffffffftttt1111dddd,,,,zzzzfffffffftttt1111dddd((((3333FFFF))))
  71.  
  72.  
  73.  
  74.      Unchanged on exit.
  75.  
  76.  
  77. EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
  78.      Direct Fourier Transform of a sequence of 1024 real values.  Elements of
  79.      sequence are stored with increment (stride) 1.
  80.      _F_o_r_t_r_a_n
  81.           real array(0:1026-1), coeff(1024+15)
  82.           call cfft1di( 1024, coeff)
  83.           call cfft1d( -1, 1024, array, 1, coeff)
  84.  
  85.      _C
  86.           #include <fft.h>
  87.           complex array[1026], *coeff;
  88.           coeff = cfft1di( 1024, NULL);
  89.           cfft1d( -1, 1024, array, 1, coeff);
  90.  
  91. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  92.      fft, cfft1di, zfft1di, cscal1d, zscal1d
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.